#define sleep_Variable

#include "userDef.h"

void SleepTime(void)
{
    static U8 SleepSec = 0;
    static U8 SleepMin = 0;

    if (b_sleep.set == ON)
    {
        SleepSec++;

        if (SleepSec >= Norm60Fast02)
        {
            SleepSec = 0;
            SleepMin++;

            if (SleepMin >= Norm60Fast02)
            {
                SleepMin = 0;

                if (SleepTemp < 20)
                {
                    SleepTemp += 10;
                }
            }
        }
    }
    else
    {
        SleepSec = 0;
        SleepMin = 0;
        SleepTemp = 0;
    }
}
